package Task;

public class ConstructionBank extends Bank {
    private double year;

    public ConstructionBank(int year, double savedMoney) {
        super(year, savedMoney);
        this.year = year;
    }

    @Override
    public double computerInterest() {
        double fullYearInterest = super.computerInterest(); // 计算整年的利息
        double additionalInterest = (year - (int) year) * 0.35 * savedMoney / 365; // 计算额外天数的利息
        return fullYearInterest + additionalInterest;
    }
}


